package main

import (
	"github.com/gin-gonic/gin"
	"go_web/mapper"
)

func main() {
    r := gin.Default()

    // 路由组
    router := r.Group("/shn")
    {
        router.GET("/ping", func(ctx *gin.Context) {
            ctx.JSON(200, gin.H{
                "message": "shn-pong",
            })
        })
		router.POST("/create", mapper.Asset{}.Create)
		router.GET("/query", mapper.Asset{}.Query)
		router.POST("/transfer", mapper.Asset{}.Transfer)
    }

    r.Run(":8080")
}